﻿<?php
header("Content-Type: text/html;charset=utf-8");
$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "data";
// 创建连接
$conn = new mysqli($servername, $username, $password, $dbname);
// 检测连接
if ($conn->connect_error) {
  die("连接失败: " . $conn->connect_error);
}
echo "连接成功";
$conn->query("SET NAMES UTF8");
//  $_GET['postname']

?>
<!DOCTYPE html>
<html>

<head>
  <title>post</title>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <link href="resources/css/axure_rp_page.css" type="text/css" rel="stylesheet" />
  <link href="data/styles.css" type="text/css" rel="stylesheet" />
  <link href="files/post/styles.css" type="text/css" rel="stylesheet" />
  <script src="resources/scripts/jquery-3.2.1.min.js"></script>
  <script src="resources/scripts/axure/axQuery.js"></script>
  <script src="resources/scripts/axure/globals.js"></script>
  <script src="resources/scripts/axutils.js"></script>
  <script src="resources/scripts/axure/annotation.js"></script>
  <script src="resources/scripts/axure/axQuery.std.js"></script>
  <script src="resources/scripts/axure/doc.js"></script>
  <script src="resources/scripts/messagecenter.js"></script>
  <script src="resources/scripts/axure/events.js"></script>
  <script src="resources/scripts/axure/recording.js"></script>
  <script src="resources/scripts/axure/action.js"></script>
  <script src="resources/scripts/axure/expr.js"></script>
  <script src="resources/scripts/axure/geometry.js"></script>
  <script src="resources/scripts/axure/flyout.js"></script>
  <script src="resources/scripts/axure/model.js"></script>
  <script src="resources/scripts/axure/repeater.js"></script>
  <script src="resources/scripts/axure/sto.js"></script>
  <script src="resources/scripts/axure/utils.temp.js"></script>
  <script src="resources/scripts/axure/variables.js"></script>
  <script src="resources/scripts/axure/drag.js"></script>
  <script src="resources/scripts/axure/move.js"></script>
  <script src="resources/scripts/axure/visibility.js"></script>
  <script src="resources/scripts/axure/style.js"></script>
  <script src="resources/scripts/axure/adaptive.js"></script>
  <script src="resources/scripts/axure/tree.js"></script>
  <script src="resources/scripts/axure/init.temp.js"></script>
  <script src="resources/scripts/axure/legacy.js"></script>
  <script src="resources/scripts/axure/viewer.js"></script>
  <script src="resources/scripts/axure/math.js"></script>
  <script src="resources/scripts/axure/jquery.nicescroll.min.js"></script>
  <script src="data/document.js"></script>
  <script src="files/post/data.js"></script>
  <script type="text/javascript">
    $axure.utils.getTransparentGifPath = function() {
      return 'resources/images/transparent.gif';
    };
    $axure.utils.getOtherPath = function() {
      return 'resources/Other.html';
    };
    $axure.utils.getReloadPath = function() {
      return 'resources/reload.html';
    };
  </script>
</head>

<body>
  <div id="base" class="">

    <!-- Unnamed (母版head) -->

    <!-- logo (占位符) -->
    <div id="u43" class="ax_default placeholder" data-label="logo">
      <img id="u43_img" class="img " src="images/index/logo_u13.svg" />
      <div id="u43_text" class="text " style="display:none; visibility: hidden">
        <p></p>
      </div>
    </div>

    <!-- searchBar (文本框) -->
    <div id="u44" class="ax_default text_field" data-label="searchBar">
      <div id="u44_div" class=""></div>
      <input id="u44_input" type="text" value="" class="u44_input" />
    </div>

    <!-- Unnamed (SVG) -->
    <div id="u45" class="ax_default _图片">
      <img id="u45_img" class="img " src="images/index/u15.svg" />
      <div id="u45_text" class="text " style="display:none; visibility: hidden">
        <p></p>
      </div>
    </div>

    <!-- Unnamed (矩形) -->
    <div id="u46" class="ax_default label">
      <div id="u46_div" class=""></div>
      <div id="u46_text" class="text ">
        <p><span style="text-decoration:none;">首页</span></p>
      </div>
    </div>

    <!-- Unnamed (矩形) -->
    <div id="u47" class="ax_default box_1">
      <div id="u47_div" class=""></div>
      <div id="u47_text" class="text ">
        <p><span style="text-decoration:none;">用户</span></p>
      </div>
    </div>
    <div id="u42" style="display:none; visibility:hidden;"></div>

    <!-- Unnamed (母版 sidebar) -->

    <!-- hot_topic (占位符) -->
    <div id="u49" class="ax_default placeholder" data-label="hot_topic">
      <img id="u49_img" class="img " src="images/index/hot_topic_u20.svg" />
      <div id="u49_text" class="text " style="display:none; visibility: hidden">
        <p></p>
      </div>
    </div>

    <!-- Unnamed (母版tail) -->

    <!-- Unnamed (表格) -->
    <div id="u51" class="ax_default">

      <!-- Unnamed (单元格) -->
      <div id="u52" class="ax_default table_cell">
        <img id="u52_img" class="img " src="images/index/u23.png" />
        <div id="u52_text" class="text ">
          <p><span style="text-decoration:none;">指南 - 协议 - 隐私保护</span></p>
        </div>
      </div>

      <!-- Unnamed (单元格) -->
      <div id="u53" class="ax_default table_cell">
        <img id="u53_img" class="img " src="images/index/u23.png" />
        <div id="u53_text" class="text ">
          <p><span style="text-decoration:none;">侵权举报 - 网上有害信息举报专区</span></p>
        </div>
      </div>

      <!-- Unnamed (单元格) -->
      <div id="u54" class="ax_default table_cell">
        <img id="u54_img" class="img " src="images/index/u25.png" />
        <div id="u54_text" class="text ">
          <p><span style="text-decoration:none;">京 ICP 证 110745 号</span></p>
        </div>
      </div>

      <!-- Unnamed (单元格) -->
      <div id="u55" class="ax_default table_cell">
        <img id="u55_img" class="img " src="images/index/u26.png" />
        <div id="u55_text" class="text ">
          <p><span style="text-decoration:none;">联系我们&nbsp; ©&nbsp; 2019 Railway</span></p>
        </div>
      </div>
    </div>
    <div id="u50" style="display:none; visibility:hidden;"></div>
    <div id="u48" style="display:none; visibility:hidden;"></div>

    <!-- post (占位符) -->
    <div id="u56" class="ax_default placeholder" data-label="post">
      <?php
      $sql = "SELECT * FROM post_data ";
      $result = $conn->query($sql);
      if ($result->num_rows > 0) {
        // 输出数据
        while ($row = $result->fetch_assoc()) {
          echo "topic: " . $row["topic"] . " - posttime: " . $row["posttime"] . " " . $row["content"] . " " . $row["num"] . "<br>";
        }
      } else {
        echo "0 结果";
      }
      ?>
    </div>
  </div>
  <script src="resources/scripts/axure/ios.js"></script>
</body>

</html>